(function($) {

    
    $.createBaseDialog = function createBaseDialog(titles, content,className) {
        bootbox.dialog({
            title : titles,
            message :content,// 内容
            animate : true,// animate the dialog in and out (not supported in <
                            // IE
            // 10)
            /* closeButton: false,//关闭X */
            buttons : {
                danger : {
                    label : "<i class='icon-ok'></i>确定",// 按钮名称
                    className : className||"btn-primary"// 按钮样式
                }
            }
        });
    };
    
    $.msgInfoAlert = function createmsgInfoAlert( content) {
         $.createBaseDialog("提示",content);
    };
    
    $.msgWarnAlert = function createmsgWarnAlert( content) {
         $.createBaseDialog('警告',content,"btn-warning");
    };
    
    $.msgErrorAlert = function createmsgWarnAlert( content) {
         $.createBaseDialog("错误",content,"btn-danger");
    };
    
    $.msgConfirm = function createmsgConfirm( title,content,okCallback,cancelCallback) {
         bootbox.dialog({  
            message: content,  
            title: title,  
            buttons: {  
                Cancel: {  
                    label: "取消",  
                    className: "btn-default",  
                    callback: cancelCallback 
                }  
                , OK: {  
                    label: "确认",  
                    className: "btn-primary",  
                    callback: okCallback 
                }  
            }  
        });  
    };

})(jQuery);